<script>
    function validate_newsletter_form() {
       $.ajax({
                    type        : "POST",
                    cache       : false,
                    url         : "extra_functions.php",           
                    data        : {submit_nl:true,newsletter_email:$('#signupField').val()},
                    success: function(data) {
                       
                           $('#newsletter_msg_show').html(data);
                           $('#newsletter_msg_show').show();
                           //alert(data);
                           if(data=='success')
                               {

                                     $('.newsletter_msg_show').removeClass('nlsubfail');
                                     $('.newsletter_msg_show').removeClass('newsletter_msg_show').addClass('nlsubsuccess');
                                 
                                   
                               }
                           else{
                             
                                   
                                     $('.newsletter_msg_show').removeClass('nlsubsuccess').addClass('nlsubfail');
                                  
                                   
                                         $('.newsletter_msg_show').removeClass('newsletter_msg_show').addClass('nlsubfail');
                                   
                                   
                               }
                        
                    }

                });
                return false;
    }
</script>
<div class="newsletterModule">
      <div class="signupBox">
          <form action="" name="newsletter_form" id="newsletter_form" method="post">
        <input name="textfield" type="text" id="signupField" value="Enter your email here" onfocus="if (this.value == 'Enter your email here') { this.value = ''; }" onblur="if (this.value == '') { this.value = 'Enter your email here'; }"  />
        <input type="submit" name="news_letter_submit" id="signupButton" value="Submit" onclick="return validate_newsletter_form()" />
          </form>
      </div>
      <p>BE THE FIRST TO RECIEVE OUR DEAL ALERTS. SIGN UP NOW!</p>
</div>
<div class="newsletter_msg_show" id="newsletter_msg_show">
    
</div>